import time
import datetime
import sys


def main(a, b):
    i = int(a)
    j = int(b)
    with open('outw.txt', 'a+') as f:
        f.write('start\n')
        for i in range(i):
            f.write('out' + str(datetime.datetime.now()))
            f.write('\n')
            time.sleep(j)
        f.write('done\n')


if __name__ == '__main__':
    a = sys.argv[1]
    b = sys.argv[2]
    main(a, b)
